import httpRequest from '@/request'
import appConfig from '@/config/index'

// 项目列表
export function projectList () {
  return httpRequest({
    url: `${appConfig.api}project/tree`,
    method: 'post',
  })
}

// 新增项目
export function projectInsert (params: any) {
  return httpRequest({
    url: `${appConfig.api}project/create`,
    method: 'post',
    data: params
  })
}

// 编辑项目
export function projectUpdate (params: any) {
  return httpRequest({
    url: `${appConfig.api}project/update`,
    method: 'post',
    data: params
  })
}

// 删除项目
export function projectDelete (params: any) {
  return httpRequest({
    url: `${appConfig.api}project/delete`,
    method: 'post',
    data: params
  })
}

